|
CallGraph
|
00001 /*************************************************************** 00002 * Name: dotwriter.h 00003 * Purpose: Header to create writer to DOT language 00004 * Author: Vaclav Sprucek 00005 * Created: 2012-03-04 00006 * Copyright: Vaclav Sprucek 00007 * License: wxWidgets license (www.wxwidgets.org) 00008 * Notes: 00009 **************************************************************/ 00010 00011 #include "lineparser.h" 00012 #include "confcallgraph.h" 00013 #include "plugin.h" 00014 #include "static.h" 00015 #include <wx/wx.h> 00016 #include <wx/stream.h> 00017 #include <wx/txtstrm.h> 00018 #include <wx/dir.h> 00019 #include <wx/filefn.h> 00020 #include <wx/file.h> 00025 class DotWriter 00026 { 00027 private: 00028 wxString graph, end_graph, begin_graph; 00029 wxString style, shape, fontname; 00030 wxString cwhite, cblack; 00031 wxString dlabel, dedge, hedge, hnode; 00032 LineParserList *mlines; 00033 wxString output; 00034 bool writedotfile; 00035 bool dwbname; 00036 bool dwbparam; 00037 int dwcn; 00038 int dwce; 00039 int dwtn; 00040 int dwte; 00041 00042 protected: 00046 ConfCallGraph confData; 00050 IManager *m_mgr; 00051 00052 public: 00056 DotWriter(); 00060 ~DotWriter(); 00065 void setLineParser(LineParserList *pLines); 00070 void setDotWriterFromDialogSettings(IManager *mgr); 00071 // 00075 void WriteToDotLanguade(); 00080 void SendToDotAppOutputDirectory(wxString path); 00085 bool DotFileExist(wxString path); 00086 // 00091 wxString OptionsShortNameAndParameters(wxString name); 00096 wxString DefineColorForNodeEdge(int index); 00101 wxString DefineColorForLabel(int index); 00107 bool IsInArray(int index, wxArrayInt array); 00113 int ReturnIndexForColor(float time, int dwc); 00114 };